<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="moduleList.title"/></title>
    <meta name="heading" content="<fmt:message key='moduleList.heading'/>"/>
</head>

<c:set var="buttons">
    <input type="button" style="margin-right: 5px" class="button"
        onclick="location.href='<c:url value="/editModule.html"/>'"
        value="<fmt:message key="button.add"/>"/>

    <input type="button" class="button" onclick="location.href='<c:url value="/mainMenu.html"/>'"
        value="<fmt:message key="button.done"/>"/>
</c:set>

<c:out value="${buttons}" escapeXml="false" />

<display:table name="modules" class="table" requestURI="" id="moduleList" export="true" pagesize="25">
    <display:column property="id" sortable="true" href="editModule.html" media="html"
        paramId="id" paramProperty="id" titleKey="module.id"/>
    <display:column property="id" media="csv excel xml pdf" titleKey="module.id"/>
    <display:column sortProperty="activeDate" sortable="true" titleKey="module.activeDate">
         <fmt:formatDate value="${moduleList.activeDate}" pattern="${datePattern}"/>
    </display:column>
    <display:column sortProperty="createDate" sortable="true" titleKey="module.createDate">
         <fmt:formatDate value="${moduleList.createDate}" pattern="${datePattern}"/>
    </display:column>
    <display:column property="description" sortable="true" titleKey="module.description"/>
    <display:column property="duphong" sortable="true" titleKey="module.duphong"/>
    <display:column sortProperty="lastUpdate" sortable="true" titleKey="module.lastUpdate">
         <fmt:formatDate value="${moduleList.lastUpdate}" pattern="${datePattern}"/>
    </display:column>
    <display:column property="name" sortable="true" titleKey="module.name"/>
    <display:column property="roleId" sortable="true" titleKey="module.roleId"/>
    <display:column property="status" sortable="true" titleKey="module.status"/>
    <display:column property="url" sortable="true" titleKey="module.url"/>

    <display:setProperty name="paging.banner.item_name"><fmt:message key="moduleList.module"/></display:setProperty>
    <display:setProperty name="paging.banner.items_name"><fmt:message key="moduleList.modules"/></display:setProperty>

    <display:setProperty name="export.excel.filename"><fmt:message key="moduleList.title"/>.xls</display:setProperty>
    <display:setProperty name="export.csv.filename"><fmt:message key="moduleList.title"/>.csv</display:setProperty>
    <display:setProperty name="export.pdf.filename"><fmt:message key="moduleList.title"/>.pdf</display:setProperty>
</display:table>

<c:out value="${buttons}" escapeXml="false" />

<script type="text/javascript">
    highlightTableRows("moduleList");
</script>
